1. Field of the Invention
The invention relates to flash memory devices, and more particularly to power failure handling of flash memory devices.
2. Description of the Related Art
Flash memories are classified into single-level-cell (SLC) flash memories, multiple-level-cell (MLC) flash memories, and triple-level-cell (TLC) flash memories. An MLC flash memory and a TLC flash memory have a data capacity higher than that of an SLC flash memory. A memory cell of an SLC flash memory can only store a data bit. A memory cell of an MLC flash memory, however, can store two data bits, and the two data bits of a memory cell respectively belong to a strong page and a corresponding weak page. A memory cell of a TLC flash memory can store three data bits, and the three data bits of a memory cell respectively belong to a strong page, a corresponding weak page, and a corresponding very weak page.
Ordinarily, when a controller receives data to be written to a flash memory, the controller sequentially writes the data to a plurality of pages of the flash memory. When data are sequentially written into a strong page and a corresponding weak page of an MLC flash memory, the data written to the weak page affects the data previously written to the corresponding strong page. Similarly, when data are sequentially written into a strong page, a corresponding weak page, and a corresponding very weak page of a TLC flash memory, the data written to the weak page affects the data previously written to the corresponding strong page, and the data written to the very weak page affects the data previously written to the corresponding strong page and the corresponding weak page.
Because a flash memory is usually used in a portable device for data storage, and portable devices are powered by a limited power source such as batteries, the flash memory is often exposed to the risk of power failure. Because subsequent data writing affects previous data stored in an MLC flash memory and a TLC flash memory, when a power supplied to the MLC flash memory and the TLC flash memory are suddenly turned off, subsequent data written to the MLC flash memory and the TLC flash memory may be halted or damaged, and the data previously stored in the MLC flash memory and the TLC flash memory may be damaged due to the destruction of subsequent data. A flash memory device capable of avoiding data from being damaged due to power failure is therefore required.